<%@page import="org.webcamp.users.dto.User"%>
<!DOCTYPE html >
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta http-equiv="Expires" content="Sat, 01 Dec 2001 00:00:00 GMT">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <link href="css/bootstrap.css" rel="stylesheet"/>

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script src="resources/js/jquery.min.js"></script>

</head>
<body>
<center>
<div  style="max-width: 800px;" class="container">
<% User loggedUser = (User) session.getAttribute("user"); 
%>	
	<nav class="navbar navbar-default" role="navigation">
		<div class="container-fluid">
			<a href="selection.do"><div class="navbar-brand">XQuesty</div></a>
			<%if (loggedUser != null ) {%>
			<div class="nav navbar-nav navbar-right navbar-brand"><%=loggedUser.getName() + " (" + loggedUser.getEmail() + ")" %> 
					<a href="logout.do" class="btn btn-warning btn-xs" role="button">log out</a>
					<%if (loggedUser != null && loggedUser.getName().equals("admin")) {%>
						<a href="settings.do" class="btn btn-warning btn-xs" role="button">Administration</a>
					<%} %>
					<a href="user-results.do" class="btn btn-success btn-xs" role="button">View Results</a>
			</div>
			<%} %>
		</div>
	</nav>

